import { S } from '../../s';
import { IPSDEChartTitle } from './ipsdechart-title';
import { IPSLanguageRes } from '../../res/ipslanguage-res';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEChartTitleImpl
  extends PSModelObjectImpl
  implements IPSDEChartTitle
{
  get index(): number {
    return this.M.index;
  }

  get subTitle(): string {
    return this.M.subTitle;
  }

  protected subtitlepslanguageres: IPSLanguageRes;
  getSubTitlePSLanguageRes(): IPSLanguageRes | null {
    return (
      this.subtitlepslanguageres ||
      (this.subtitlepslanguageres = this.fillObjectModel(
        S._276,
        this.M.getSubTitlePSLanguageRes,
        S._307,
      ) as IPSLanguageRes)
    );
  }

  get title(): string {
    return this.M.title;
  }

  protected titlepslanguageres: IPSLanguageRes;
  getTitlePSLanguageRes(): IPSLanguageRes | null {
    return (
      this.titlepslanguageres ||
      (this.titlepslanguageres = this.fillObjectModel(
        S._276,
        this.M.getTitlePSLanguageRes,
        S._2b1,
      ) as IPSLanguageRes)
    );
  }

  get titlePos(): string {
    return this.M.titlePos;
  }

  get showTitle(): boolean {
    return this.M.showTitle;
  }
  get cls(): string {
    return 'PSDEChartTitleImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._112 || cls == S._113) return true;
    return super.instanceof(cls);
  }
}
